package com.kzx.blog.service.impl;

import com.kzx.blog.config.model.Constant;
import com.kzx.blog.service.IFile;
import com.kzx.blog.util.OBSUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author kongz
 * @version 1.0 2021/12/10 10:59
 * @description TODO
 */
@Service
public class FileImpl implements IFile {

    @Autowired
    OBSUtils obsUtils;

    @Override
    public String upload(MultipartFile file) {
        return Constant.IMG_PRE + obsUtils.uploadFile(file);
    }
}
